Tailwind踩坑
✔️

Tailwind踩坑

published_date
最新编辑 2024年10月09日
slug
要修复Tailwind CSS中的“未知规则@tailwind”警告,首先安装Tailwind CSS IntelliSense插件,然后将CSS文件与Tailwind CSS关联。打开CSS文件,按Shift + P并搜索“更改语言模式”,输入“tailwindcss”并选择它,这样警告就会消失。
tags
Tailwind CSS
How to Fix unknownAtRules Warnings From Tailwind CSS

Installing Tailwind CSS IntelliSense Plugin

To fix “Unknown at rule @tailwind” warning, start by installing Tailwind CSS IntelliSense plugin.
When that is done, you need to associate your CSS file with Tailwind CSS.
  1. Open the CSS file where you import Tailwind CSS
  1. Press Shift + P and search for “change language mode
  1. Inside the search bar, type “tailwindcss” and select it.
Now your CSS file is associated with Tailwind CSS and the warnings should be gone.